package sharemem

const (
	CARD_SKILL_MAX	=	4
)

type SkillLevel struct {
	Cd_time		int32
	Ids			[CARD_SKILL_MAX]int32
}

func (s *SkillLevel)meminit() {
	s.Cd_time = 0
	for i:=0;i<CARD_SKILL_MAX;i++ {
		s.Ids[i] = 0
	}
}

type SkillCard struct {
	Id         int32
	Weight	   int32
	Target	   int8
	Tag			int8
	Skill1	   SkillLevel
	Skill2	   SkillLevel
	Skill3	   SkillLevel
}

func (tmp *SkillCard) meminit() {
	tmp.Id = 0
	tmp.Weight = 0
	tmp.Target = 0
	tmp.Tag	= 0
	tmp.Skill1.meminit()
	tmp.Skill2.meminit()
	tmp.Skill3.meminit()
}
func (tmp *SkillCard) isUse() bool {
	return tmp.Id > 0
}
func (tmp *SkillCard) getId() int32 {
	return tmp.Id
}

func Get_config_skill_card(id int32) *SkillCard {
	v, ok := GetConfigSkillCardMap()[id]
	if !ok {
		return nil
	}

	return v
}
